home *** CD-ROM | disk | FTP | other *** search
- *** make-3.58/orig/arscan.c Fri Oct 20 01:46:34 1989
- --- make-3.58/arscan.c Fri Feb 16 21:15:10 1990
- ***************
- *** 24,30 ****
- --- 24,34 ----
- #define PORTAR 1
- #endif
-
- + #ifdef GEMDOS
- + #include <gnu-ar.h>
- + #else
- #include <ar.h>
- + #endif
- #include <stdio.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- ***************
- *** 266,271 ****
- --- 270,279 ----
- if (!pos)
- return 1;
-
- + #ifdef GEMDOS
- + if (utime(arname, 0L) < 0) /* GEMDOS needs this to touch the file */
- + return -3;
- + #endif
- fd = open (arname, O_RDWR, 0666);
- if (fd < 0)
- return -3;
- ***************
- *** 280,286 ****
- --- 288,298 ----
- if (sizeof ar_hdr != write (fd, (char *) &ar_hdr, sizeof ar_hdr))
- goto lose;
- /* The file's mtime is the time we we want. */
- + #ifdef GEMDOS
- + stat(arname, &statbuf);
- + #else
- fstat (fd, &statbuf);
- + #endif
- #ifdef ARFMAG
- /* Advance member's time to that time */
- for (i = 0; i < sizeof ar_hdr.ar_date; i++)
- *** make-3.58/orig/commands.c Mon Feb 12 19:43:02 1990
- --- make-3.58/commands.c Mon Feb 12 19:23:34 1990
- ***************
- *** 342,347 ****
- --- 342,348 ----
- int sig;
- {
- signal (sig, SIG_DFL);
- + #ifndef GEMDOS
- #ifndef USG
- (void) sigsetmask (0);
- #endif
- ***************
- *** 387,392 ****
- --- 388,394 ----
- wait_for_children (0, 1);
-
- /* Delete any non-precious intermediate files that were made. */
- + #endif /* GEMDOS */
-
- remove_intermediates (1);
-
- *** make-3.58/orig/dir.c Wed Oct 4 01:12:46 1989
- --- make-3.58/dir.c Mon Jan 29 22:47:32 1990
- ***************
- *** 36,41 ****
- --- 36,47 ----
- #endif /* USGr3 or DIRENT. */
-
-
- + #ifdef GEMDOS
- + #define HASH_LIMIT 8 /* only consider this many characters of file names */
- + static short _limit = 0;
- + #endif
- +
- +
- /* Hash table of directories. */
-
- struct directory
- ***************
- *** 83,94 ****
- --- 89,108 ----
- register char *p;
- register struct directory *dir;
-
- + #ifdef GEMDOS
- + for (p = name, _limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
- + #else
- for (p = name; *p != '\0'; ++p)
- + #endif
- HASH (hash, *p);
- hash %= DIRECTORY_BUCKETS;
-
- for (dir = directories[hash]; dir != 0; dir = dir->next)
- + #ifdef GEMDOS
- + if (DOS_streq (dir->name, name))
- + #else
- if (streq (dir->name, name))
- + #endif
- break;
-
- if (dir == 0)
- ***************
- *** 151,157 ****
- --- 165,175 ----
- /* Checking if the directory exists. */
- return 1;
-
- + #ifdef GEMDOS
- + for (p = filename,_limit = HASH_LIMIT; *p != '\0' && _limit-- > 0; ++p)
- + #else
- for (p = filename; *p != '\0'; ++p)
- + #endif
- HASH (hash, *p);
- hash %= DIRFILE_BUCKETS;
-
- ***************
- *** 158,164 ****
- --- 176,186 ----
- /* Search the list of hashed files. */
-
- for (df = dir->files[hash]; df != 0; df = df->next)
- + #ifdef GEMDOS
- + if (DOS_streq (df->name, filename))
- + #else
- if (streq (df->name, filename))
- + #endif
- return !df->impossible;
- }
-
- ***************
- *** 174,180 ****
- --- 196,206 ----
- /* Enter the file in the hash table. */
- register unsigned int newhash = 0;
- register unsigned int i;
- + #ifdef GEMDOS
- + for (i = 0, _limit = HASH_LIMIT; i < D_NAMLEN(d) && _limit-- > 0; ++i)
- + #else
- for (i = 0; i < D_NAMLEN(d); ++i)
- + #endif
- HASH (newhash, d->d_name[i]);
- newhash %= DIRFILE_BUCKETS;
- df = (struct dirfile *) xmalloc (sizeof (struct dirfile));
- ***************
- *** 184,191 ****
- df->impossible = 0;
-
- /* Check if the name matches the one we're searching for. */
- ! if (filename != 0
- ! && newhash == hash && streq (d->d_name, filename))
- return 1;
- }
-
- --- 210,222 ----
- df->impossible = 0;
-
- /* Check if the name matches the one we're searching for. */
- ! if (filename != 0 && newhash == hash
- ! #ifdef GEMDOS
- ! && DOS_streq (d->d_name, filename)
- ! #else
- ! && streq (d->d_name, filename)
- ! #endif
- ! )
- return 1;
- }
-
- ***************
- *** 251,257 ****
- --- 282,293 ----
- filename = p = dirend + 1;
- }
-
- + #ifdef GEMDOS
- + _limit = HASH_LIMIT;
- + for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
- + #else
- for (hash = 0; *p != '\0'; ++p)
- + #endif
- HASH (hash, *p);
- hash %= DIRFILE_BUCKETS;
-
- ***************
- *** 300,311 ****
- --- 336,356 ----
- /* There are no files entered for this directory. */
- return 0;
-
- + #ifdef GEMDOS
- + _limit = HASH_LIMIT;
- + for (hash = 0; *p != '\0' && _limit-- > 0; ++p)
- + #else
- for (hash = 0; *p != '\0'; ++p)
- + #endif
- HASH (hash, *p);
- hash %= DIRFILE_BUCKETS;
-
- for (next = dir->files[hash]; next != 0; next = next->next)
- + #ifdef GEMDOS
- + if (DOS_streq (filename, next->name))
- + #else
- if (streq (filename, next->name))
- + #endif
- return next->impossible;
-
- return 0;
- ***************
- *** 381,383 ****
- --- 426,469 ----
- printf ("%u", impossible);
- printf (" impossibilities in %u directories.\n", dirs);
- }
- +
- + #ifdef GEMDOS
- + /* checks to see if two names refer to the same file */
- + int DOS_streq(name1, name2)
- + char *name1, *name2;
- + {
- + static char _name1[64], _name2[64];
- + char *lastslash;
- + extern char *rindex();
- + int i;
- +
- + if (!strcmp(name1, name2)) return 1;
- +
- + unx2dos(name1, _name1);
- + unx2dos(name2, _name2);
- +
- + name1 = rindex(_name1, '\\'); if (!name1) name1 = _name1;
- + name2 = rindex(_name2, '\\'); if (!name2) name2 = _name2;
- + for(i = 8; i>0; i--) {
- + if (*name1 != *name2) return 0;
- + if (*name1 == 0)
- + return 1;
- + if (*name1 == '.')
- + goto doext;
- + name1++; name2++;
- + }
- +
- + /* now look for extension */
- + while (*name1 && *name1 != '.') name1++;
- + while (*name2 && *name2 != '.') name2++;
- + if (*name1 != *name2) return 0;
- + doext:
- + name1++; name2++;
- + for (i = 3; i > 0; i--) {
- + if (*name1 != *name2) return 0;
- + if (!*name1) return 1;
- + name1++; name2++;
- + }
- + return 1;
- + }
- + #endif /* GEMDOS */
- *** make-3.58/orig/function.c Mon Feb 12 19:43:06 1990
- --- make-3.58/function.c Mon Feb 12 19:24:16 1990
- ***************
- *** 337,342 ****
- --- 337,345 ----
- else
- buf[0] = '\0';
-
- + #ifdef GEMDOS
- + perror_with_name (buf, "function not allowed under GEMDOS");
- + #else
- if (pipe (pipedes) < 0)
- {
- perror_with_name (buf, "pipe");
- ***************
- *** 430,435 ****
- --- 433,439 ----
- free (buffer);
- }
-
- + #endif /* GEMDOS */
- free (text);
- break;
- }
- *** make-3.58/orig/job.c Mon Feb 12 19:43:12 1990
- --- make-3.58/job.c Tue Feb 13 18:50:50 1990
- ***************
- *** 23,28 ****
- --- 23,34 ----
- #include "variable.h"
- #include <errno.h>
-
- + #ifdef GEMDOS
- + #include <ctype.h>
- + extern char *findfile();
- + static char *_extensions[] = { "ttp", "prg", "tos", 0 };
- + #endif
- +
- extern int errno;
-
- #if defined(USG) && !defined(HAVE_VFORK)
- ***************
- *** 33,39 ****
- #endif /* USG and don't have vfork. */
- extern int vfork ();
-
- ! #if defined(HAVE_SYS_WAIT) || !defined(USG)
- #include <sys/wait.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- --- 39,45 ----
- #endif /* USG and don't have vfork. */
- extern int vfork ();
-
- ! #if (defined(HAVE_SYS_WAIT) || !defined(USG)) && !defined(GEMDOS)
- #include <sys/wait.h>
- #include <sys/time.h>
- #include <sys/resource.h>
- ***************
- *** 62,67 ****
- --- 68,84 ----
-
- #else /* WTERMSIG not defined and have <sys/wait.h> or not USG. */
-
- + # ifdef GEMDOS
- + # define WAIT_T int
- + # define WTERMSIG(x) 0
- + # define WCOREDUMP(x) 0
- + # define WEXITSTATUS(x) x
- + # define WIFSIGNALED(x) (WTERMSIG (x) != 0)
- + # define WIFEXITED(x) (WTERMSIG (x) == 0)
- +
- + # else
- +
- +
- #define WAIT_T union wait
- #define WTERMSIG(x) ((x).w_termsig)
- #define WCOREDUMP(x) ((x).w_coredump)
- ***************
- *** 70,75 ****
- --- 87,94 ----
- #define WIFSIGNALED(x) (WTERMSIG(x) != 0)
- #endif
-
- + #endif /* GEMDOS */
- +
- #endif /* WTERMSIG defined or USG and don't have <sys/wait.h>. */
-
-
- ***************
- *** 153,159 ****
- --- 172,180 ----
- Using the default action does the right thing. */
- (void) signal (SIGCLD, SIG_DFL);
- #else
- + # ifndef GEMDOS
- (void) sigblock (sigmask (SIGCHLD));
- + # endif
- #endif
-
- block_remote_children ();
- ***************
- *** 166,172 ****
- --- 187,195 ----
- #ifdef USG
- (void) signal (SIGCLD, child_handler);
- #else
- + # ifndef GEMDOS
- (void) sigsetmask (sigblock (0) & ~sigmask (SIGCHLD));
- + # endif
- #endif
-
- unblock_remote_children ();
- ***************
- *** 209,215 ****
- {
- /* No remote children. Check for local children. */
-
- ! #if !defined(USG) || defined(HAVE_SYS_WAIT)
- if (sig > 0)
- pid = wait3 (&status, WNOHANG, (struct rusage *) 0);
- else
- --- 232,238 ----
- {
- /* No remote children. Check for local children. */
-
- ! #if (!defined(USG) || defined(HAVE_SYS_WAIT)) && !defined(GEMDOS)
- if (sig > 0)
- pid = wait3 (&status, WNOHANG, (struct rusage *) 0);
- else
- ***************
- *** 238,243 ****
- --- 261,267 ----
- /* We got a remote child. */
- remote = 1;
-
- + #ifndef GEMDOS
- /* Check if this is the child of the `shell' function. */
- if (!remote && pid == shell_function_pid)
- {
- ***************
- *** 259,264 ****
- --- 283,290 ----
- continue;
- }
-
- + #endif /* GEMDOS */
- +
- child_failed = exit_sig != 0 || exit_code != 0;
-
- /* Search for a child matching the deceased one. */
- ***************
- *** 536,541 ****
- --- 562,568 ----
-
- /* Set up a bad standard input that reads from a broken pipe. */
-
- + #ifndef GEMDOS
- if (bad_stdin == -1)
- {
- /* Make a file descriptor that is the read end of a broken pipe.
- ***************
- *** 549,554 ****
- --- 576,582 ----
- bad_stdin = pd[0];
- }
- }
- + #endif /* GEMDOS */
-
- /* Decide whether to give this child the `good' standard input
- (one that points to the terminal or whatever), or the `bad' one
- ***************
- *** 695,700 ****
- --- 723,729 ----
- if (stdout_fd != 1)
- (void) dup2 (stdout_fd, 1);
-
- + #ifndef GEMDOS
- /* Free up file descriptors. */
- {
- register int d;
- ***************
- *** 702,707 ****
- --- 731,737 ----
- for (d = 3; d < max; ++d)
- (void) close (d);
- }
- + #endif
-
- /* Don't block children for our child. */
- unblock_children ();
- ***************
- *** 719,724 ****
- --- 749,757 ----
- search_path (file, path)
- char *file, *path;
- {
- + #ifdef GEMDOS
- + return findfile(file, path, _extensions);
- + #else
- if (*path == '\0' || index (file, '/') != 0)
- return file;
- else
- ***************
- *** 785,790 ****
- --- 818,824 ----
- }
-
- return 0;
- + #endif /* GEMDOS */
- }
-
- /* Replace the current process with one running the command in ARGV,
- ***************
- *** 855,861 ****
- --- 889,899 ----
- char *line;
- struct file *file;
- {
- + #ifdef GEMDOS
- + static char sh_chars[] = "#;\"*?[]&|<>(){}$`";
- + #else
- static char sh_chars[] = "#;\"*?[]&|<>(){}=$`";
- + #endif
- static char *sh_cmds[] = { "cd", "eval", "exec", "exit", "login",
- "logout", "set", "umask", "wait", "while", "for",
- "case", "if", ":", ".", "break", "continue",
- ***************
- *** 868,873 ****
- --- 906,912 ----
- int instring;
- char **new_argv = 0;
-
- + #ifndef GEMDOS
- /* See if it is safe to parse commands internally. */
- p = variable_expand_for_file ("$(SHELL)", file);
- if (strcmp (p, "/bin/sh"))
- ***************
- *** 876,881 ****
- --- 915,921 ----
- for (ap = p; *ap != '\0'; ++ap)
- if (*ap != ' ' && *ap != '\t' && *ap != '\n')
- goto slow;
- + #endif /* GEMDOS */
-
- i = strlen (line) + 1;
-
- ***************
- *** 911,916 ****
- --- 951,962 ----
- {
- case '\\':
- if (p[1] != '\0' && p[1] != '\n')
- + #ifdef GEMDOS
- + /* in case we're in a file name -- this is a kludge! */
- + if (isalnum(p[1]) || p[1] == '.')
- + *ap++ = *p;
- + else
- + #endif
- /* Copy and skip the following char. */
- *ap++ = *++p;
- break;
- ***************
- *** 1144,1146 ****
- --- 1190,1204 ----
- return fd;
- }
- #endif /* USG and not USGr3 and not HAVE_DUP2. */
- +
- + #ifdef GEMDOS
- + int execve(name, argv, envp)
- + char *name, **argv, **envp;
- + {
- + int r;
- +
- + r = spawnve(0, name, argv, envp);
- + if (r < 0) return r;
- + _exit(r);
- + }
- + #endif
- *** make-3.58/orig/main.c Mon Feb 12 19:43:24 1990
- --- make-3.58/main.c Mon Feb 12 19:25:18 1990
- ***************
- *** 24,29 ****
- --- 24,32 ----
- #include <ctype.h>
- #include <time.h>
-
- + #ifdef GEMDOS
- + long _stksize = 20*1024L;
- + #endif
-
- extern char *version_string;
-
- ***************
- *** 283,289 ****
- --- 286,298 ----
- register struct dep *lastgoal;
- struct dep *read_makefiles;
- char current_directory[MAXPATHLEN];
- + #if defined(GEMDOS) && defined(__GNUC__)
- + extern int _unixmode;
- + extern int _mallocChunkSize();
-
- + _unixmode = 3; /* full Unix filename translation */
- + _mallocChunkSize(16*1024L); /* minimum asked for from system */
- + #endif
- default_goal_file = 0;
- reading_filename = 0;
- reading_lineno_ptr = 0;
- ***************
- *** 345,358 ****
-
- /* Figure out where this program lives. */
-
- ! if (argv[0] == 0)
- ! argv[0] = "";
- ! if (argv[0][0] == '\0')
- program = "make";
- else
- {
- program = rindex (argv[0], '/');
- if (program == 0)
- program = argv[0];
- else
- ++program;
- --- 354,369 ----
-
- /* Figure out where this program lives. */
-
- ! if (argv[0] == 0 || argv[0][0] == '\0')
- program = "make";
- else
- {
- program = rindex (argv[0], '/');
- if (program == 0)
- + #ifdef GEMDOS
- + program = rindex(argv[0], '\\');
- + if (program == 0)
- + #endif
- program = argv[0];
- else
- ++program;
- ***************
- *** 565,571 ****
- --- 576,584 ----
- #ifdef SIGCHLD
- (void) signal (SIGCHLD, child_handler);
- #else
- + # ifdef SIGCLD
- (void) signal (SIGCLD, child_handler);
- + # endif
- #endif
-
- /* Install the default implicit rules. */
- *** make-3.58/orig/make.h Sun Sep 17 19:35:56 1989
- --- make-3.58/make.h Mon Feb 12 20:24:32 1990
- ***************
- *** 18,23 ****
- --- 18,27 ----
- #include <signal.h>
- #include <stdio.h>
-
- + #ifdef GEMDOS
- + #define DIRENT
- + #endif
- +
- #ifndef sun
- #include <sys/types.h>
- #endif
- ***************
- *** 67,74 ****
- --- 71,83 ----
- #endif
-
- /* Add to VAR the hashing value of C, one character in a name. */
- + #ifdef GEMDOS
- + #define HASH(var, c) \
- + ((var += toupper(c)), (var = ((var) << 7) + ((var) >> 20)))
- + #else
- #define HASH(var, c) \
- ((var += (c)), (var = ((var) << 7) + ((var) >> 20)))
- + #endif
-
- #if defined(__GNUC__) || defined(ENUM_BITFIELDS)
- #define ENUM_BITFIELD(bits) :bits
- ***************
- *** 116,122 ****
- extern int glob_pattern_p ();
- extern char **glob_filename ();
-
- ! #ifndef USG
- extern int sigsetmask ();
- #endif
- extern int kill (), sigblock ();
- --- 125,131 ----
- extern int glob_pattern_p ();
- extern char **glob_filename ();
-
- ! #if !defined(USG) && !defined(GEMDOS)
- extern int sigsetmask ();
- #endif
- extern int kill (), sigblock ();
- *** make-3.58/orig/makefile Mon Feb 12 19:42:58 1990
- --- make-3.58/makefile Tue Feb 13 21:14:26 1990
- ***************
- *** 18,27 ****
- #
- # Makefile for GNU Make
- #
-
- - CFLAGS = $(defines) -g
- - LDFLAGS = -g
- -
- # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
- # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate). If you have a
- # USG hybrid with <sys/wait.h> and wait3, define HAVE_SYS_WAIT. If you are USG
- --- 18,28 ----
- #
- # Makefile for GNU Make
- #
- + # Note: Atari ST users may as well omit the -g, since the Atari gdb doesn't
- + # support it.
- + CFLAGS = $(defines) -O -fomit-frame-pointer
- + LDFLAGS =
-
- # Define nothing for BSD, USG for System V, and USGr3 (as well as USG) for
- # SVR3, HPUX for HP-UX (as well as USG or USGr3 as appropriate). If you have a
- # USG hybrid with <sys/wait.h> and wait3, define HAVE_SYS_WAIT. If you are USG
- ***************
- *** 31,38 ****
- # NO_MINUS_C_MINUS_O. If you don't want archive support, define NO_ARCHIVES.
- # If you want to avoid use of floating-point numbers, define NO_FLOAT. If your
- # compiler can handle `enum' bitfields (and it's not GCC), define
- ! # ENUM_BITFIELDS.
- ! defines =
-
- # Define UMAX here to use Encore's inq_stats call. Define UMAX_43 (and UMAX)
- # if you have UMAX 4.3 instead of UMAX 4.2. If the load average is in a symbol
- --- 32,39 ----
- # NO_MINUS_C_MINUS_O. If you don't want archive support, define NO_ARCHIVES.
- # If you want to avoid use of floating-point numbers, define NO_FLOAT. If your
- # compiler can handle `enum' bitfields (and it's not GCC), define
- ! # ENUM_BITFIELDS. For the Atari ST and TOS, define GEMDOS.
- ! defines = -DGEMDOS
-
- # Define UMAX here to use Encore's inq_stats call. Define UMAX_43 (and UMAX)
- # if you have UMAX 4.3 instead of UMAX 4.2. If the load average is in a symbol
- ***************
- *** 42,49 ****
- # "(double) load". If a `struct nlist' (as defined in <nlist.h>) has a `n_un'
- # union, rather than a simple `n_name' member, define NLIST_NAME_UNION. If the
- # `n_name' member of a `struct nlist' is an array that must be copied into,
- ! # define NLIST_NAME_ARRAY. Otherwise, define NO_LDAV.
- ! LOAD_AVG =
-
- # If you don't want archive support, comment these out.
- ARCHIVES = arscan.o ar.o
- --- 43,50 ----
- # "(double) load". If a `struct nlist' (as defined in <nlist.h>) has a `n_un'
- # union, rather than a simple `n_name' member, define NLIST_NAME_UNION. If the
- # `n_name' member of a `struct nlist' is an array that must be copied into,
- ! # define NLIST_NAME_ARRAY. Otherwise (e.g. GEMDOS), define NO_LDAV.
- ! LOAD_AVG = -DNO_LDAV
-
- # If you don't want archive support, comment these out.
- ARCHIVES = arscan.o ar.o
- *** make-3.58/orig/misc.c Tue Jul 11 07:45:52 1989
- --- make-3.58/misc.c Sun Jan 28 22:30:50 1990
- ***************
- *** 240,246 ****
- --- 240,250 ----
- extern int errno, sys_nerr;
- extern char *sys_errlist[];
-
- + #ifdef GEMDOS
- + if (errno <= 0 && errno >= sys_nerr)
- + #else
- if (errno < sys_nerr)
- + #endif
- error ("%s%s: %s", str, name, sys_errlist[errno]);
- else
- error ("%s%s: Unknown error %d", str, name, errno);
- *** make-3.58/orig/read.c Mon Feb 12 19:43:34 1990
- --- make-3.58/read.c Mon Feb 12 19:26:44 1990
- ***************
- *** 72,80 ****
- --- 72,85 ----
-
- static char *default_include_directories[] =
- {
- + #ifdef GEMDOS
- + "/gnu/include",
- + "/gnu/lib",
- + #else
- "/usr/gnu/include",
- "/usr/local/include",
- "/usr/include",
- + #endif
- 0
- };
-
- ***************
- *** 1354,1359 ****
- --- 1359,1369 ----
- register char **dirs = (char **) xmalloc ((5 + defsize) * sizeof (char *));
- register unsigned int idx = 0;
-
- + #ifdef GEMDOS
- + char *env_dir;
- + extern char *getenv();
- + #endif
- +
- /* First consider any dirs specified with -I switches.
- Ignore dirs that don't exist. */
-
- ***************
- *** 1373,1378 ****
- --- 1383,1396 ----
- }
- }
-
- + #ifdef GEMDOS
- + /* Check environment for where include directories are */
- + if (env_dir = getenv("GNUINC"))
- + default_include_directories[0] = env_dir;
- + if (env_dir = getenv("GNULIB"))
- + default_include_directories[1] = env_dir;
- + #endif
- +
- /* Now add at the end the standard default dirs. */
-
- for (i = 0; default_include_directories[i] != 0; ++i)
- ***************
- *** 1389,1395 ****
- --- 1407,1417 ----
- {
- unsigned int len = strlen (dirs[i]);
- /* If dir name is written with a trailing slash, discard it. */
- + #ifdef GEMDOS
- + if (dirs[i][len - 1] == '/' || dirs[i][len - 1] == '\\')
- + #else
- if (dirs[i][len - 1] == '/')
- + #endif
- /* We can't just clobber a null in because it may have come from
- a literal string and literal strings may not be writable. */
- dirs[i] = savestring (dirs[i], len - 1);
- *** make-3.58/orig/remake.c Mon Feb 12 19:43:44 1990
- --- make-3.58/remake.c Fri Feb 16 11:52:04 1990
- ***************
- *** 624,629 ****
- --- 624,634 ----
- if (fd < 0)
- TOUCH_ERROR ("touch: open: ");
- else
- + #ifdef GEMDOS
- + (void) close(fd);
- + if (utime(file->name, 0L))
- + TOUCH_ERROR("touch: utime: ");
- + #else
- {
- struct stat statbuf;
- char buf;
- ***************
- *** 648,653 ****
- --- 653,659 ----
- }
- (void) close (fd);
- }
- + #endif /* GEMDOS */
- }
-
- return 0;
- ***************
- *** 781,791 ****
- --- 787,812 ----
- {
- time_t mtime;
- char *name;
- + #ifdef GEMDOS
- + char *libpath;
- + extern char *getenv();
-
- + if (!(libpath = getenv("GNULIB")))
- + libpath = "/gnu/lib";
- +
- + libpath = concat(libpath, "/", "");
- + name = concat(libpath, lib, ".olb"); /* TOS GCC uses .olb for library files */
- + free(libpath);
- + #else
- name = concat ("/usr/lib/lib", lib, ".a");
- + #endif /* GEMDOS */
- mtime = name_mtime (name);
- if (mtime == (time_t) -1)
- + #ifdef GEMDOS
- + mtime = name_mtime (rindex(name, '/'));
- + #else
- mtime = name_mtime (name + 4);
- + #endif
- if (mtime == (time_t) -1)
- {
- char *local = concat ("/usr/local/lib/lib", lib, ".a");
- *** make-3.58/orig/variable.c Mon Feb 12 19:43:54 1990
- --- make-3.58/variable.c Mon Feb 12 19:27:40 1990
- ***************
- *** 366,371 ****
- --- 366,372 ----
- will provide one if there isn't one there. */
- v = define_variable ("SHELL", 5, "/bin/sh", o_default, 0);
-
- + #ifndef GEMDOS
- /* Don't let SHELL come from the environment
- if MAKELEVEL is 0. Also, SHELL must not be empty. */
- if (*v->value == '\0' || (v->origin == o_env && makelevel == 0))
- ***************
- *** 373,378 ****
- --- 374,380 ----
- v->origin = o_file;
- v->value = savestring ("/bin/sh", 7);
- }
- + #endif
- }
-
- /* Subroutine of variable_expand and friends:
-